home *** CD-ROM | disk | FTP | other *** search
-
- #include "A4globs.h" /* magic A4 macros */
- #include "callbackg.h" /* use "global" version of callbacks */
- #include "sliders.h"
-
- funptr callback;
-
- static short handler(EventRecord *theEvent,funptr callbackptr)
- {
- int done;
- SetUpA4();
- done = doevent(theEvent);
- RestoreA4();
- return(done);
- }
-
- static short funcall(double *retval,funptr callbackptr)
- {
- int ok;
- SetUpA4();
- ok = dofuncall(retval);
- RestoreA4();
- return(ok);
- }
-
- void main(funptr callbackptr)
- {
- EnterResource();
- callback = callbackptr; /* save callback in global for callbackg routines */
- AddXfun(FUNNAME,FUNPARMS,&funcall,0L);
- InstallEventHandler(&handler);
- initialize();
- RestoreA4();
- }
-